<ui:composition template="../principal.xhtml"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                xmlns:c="http://java.sun.com/jsp/jstl/core">
    <ui:define name="principal">
        <h2>Configuração de Dados do Dentista</h2>

        <h:form id="breadcrumb">
            <p:breadCrumb styleClass="navegacao" style="margin-top: 5px; margin-bottom: 40px">  
                <c:if test="#{loginMB.dentista.contaUsuario.tipo == 'AD'}" >  
                    <p:menuitem value="Categories" url="../user-master/menuMaster.xhtml" />  
                </c:if>
                <c:if test="#{loginMB.dentista.contaUsuario.tipo == 'DE'}" >  
                    <p:menuitem value="Categories" url="../user-simple/menuDentista.xhtml" />  
                </c:if>
                <p:menuitem value="Configuração de Conta" url="../user-master/configuracaoConta.xhtml" />
            </p:breadCrumb>
        </h:form>
        
        <h:form id="cad">
            <p:growl id="message"/>
            <p:fieldset legend="ATUALIZAR SENHA DA CONTA DE USUÁRIO" toggleable="true" toggleSpeed="500" styleClass="grupo-form" >
                <h:panelGrid columns="2" styleClass="table-form" cellspacing="10">

                    <h:outputLabel for="username" value="Username: " />  
                    <p:inputText id="username" title="username" value="#{configurarContaMB.dentista.contaUsuario.username}" label="Ssername" styleClass="campoTexto" disabled="true"/>

                    <h:outputLabel for="senhaant" value="*Senha atual: " />
                    <p:password id="senhaant" title="senha" value="#{configurarContaMB.senhaat}"  styleClass="campoTexto" required="true" />

                    <h:outputLabel for="senha1" value="*Nova senha: " />
                    <p:password id="senha1" title="senha" value="#{configurarContaMB.senha1}" feedback="true"   
                                promptLabel="Preencha o campo com a senha desejada!" weakLabel="Senha fraca!"  
                                goodLabel="Boa senha!" strongLabel="Ótima senha!" styleClass="campoTexto" required="true" />

                    <h:outputLabel for="senha2" value="*Confirme a nova senha:"/>
                    <p:password id="senha2" title="confirme a senha" value="#{configurarContaMB.senha2}" feedback="true"   
                                promptLabel="Preencha o campo com a senha desejada!" weakLabel="Senha fraca!"  
                                goodLabel="Boa senha!" strongLabel="Ótima senha!" styleClass="campoTexto" required="true" /> 
                </h:panelGrid>

            </p:fieldset>
            <h:panelGrid columns="1" style="text-align: right; width: 100%;">
                <p:commandButton value="Salvar" update=":cad" action="#{configurarContaMB.atualizarDadosConta()}" image="ui-icon ui-icon-disk" style="font-size: 15px;" />
            </h:panelGrid>
        </h:form>

    </ui:define>
</ui:composition>